# -*- coding:utf-8 -*-

import socket
import os

print "IP = ", os.getenv("IP", '0.0.0.0')
print "PORT = ", os.getenv("PORT", 8080)

port = 31500 
ip = "localhost"

address = (ip, port)

print address
print address
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(address)
data = s.recv(512)
print 'the data received is', data
s.send('hihi')
s.close()